package com.hzhq.contract.result;

/**
 * @author hzhq
 * @create 2021/3/16 8:55 下午
 * @email hzhq1255@163.com
 */
public enum ResultEnum {

    /**
     * Result enum 常见状况处理
     */
    UNKNOWN_ERROR(404,"未知错误"),
    SUCCESS(200,"success"),
    ERROR(400,"error"),
    NORMAL_ERROR(0,"请求失败"),
    NULL_ERROR(-1,"空指针异常"),
    PARAM_ERROR(-2,"参数错误"),
    PAGE_PARAM_ERROR(-3,"分页参数错误"),
    /**
     * 用户的
     */
    USER_NOT_EXIST(201,"用户不存在"),
    USER_IS_EXISTED(202,"用户已存在"),
    USER_REGISTER_SUCCESS(200,"注册成功"),
    USER_LOGIN_SUCCESS(200,"登录成功"),
    USER_LOGIN_ERROR(401,"用户名或密码错误"),
    USER_LOGIN_FAILURE(402,"登录失败"),
    USER_REGISTER_ERROR(403,"注册失败"),
    USER_REGISTER_PWD_ERROR(404,"两次输入密码不一致"),

    /**
     * 合同类型的
     */
    TEMPLATE_NOT_EXISTED(201,"模板不存在"),
    TEMPLATE_IS_EXISTED(202,"模板已存在"),


    ;

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg){
        this.msg = msg;
    }


}
